<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<style type="text/css">
table {
	margin-top:20px;
	position:relative;
	right:7px;
}
table td {
	text-align:left;
}
.table_title {
	text-align:center;
}
</style>
<table width="100%" border="0" cellpadding="2" cellspacing="0" bordercolor="#4c4c4c">
<!-- 模板信息 -->
<tr><td colspan="6" class="table_title">模板信息</td></tr>
<tr>
	<td width="16%">模板编号</td>
	<td width="16%"><label><?php echo $templates['tpl_name'];?></label></td>
	<td width="18%">模板行业</td>
	<td width="16%"><label><?php echo $template_categories['tpl_category_name'];?></label></td>
	<td width="18%">模板状态</td>
	<td width="16%"><label><?php echo $status_alias;?></label></td>
</tr>
<tr>
	<td>软件版本</td>
	<td><label><?php echo $templates['tpl_software_version'];?></label></td>
	<td>制作类型</td>
	<td><label><?php echo $tpl_type;?></label></td>
	<td>*三级域名</td>
	<?php 
	$tpl_domain = empty($templates['tpl_domain']) ? '-' : $templates['tpl_domain'];
	if(!(strpos($tpl_domain, 'http') === false))
	{
		$length = strlen($tpl_domain) - 7;
		$tpl_domain = substr($tpl_domain,-1 * $length,$length);
	}
	?>
	<td><label><a href="http://<?php echo $tpl_domain;?>"><?php echo $tpl_domain;?></a></label></td>
</tr>
<tr>
	<td>模板名称</td>
	<td colspan="5"><label><?php echo $templates['tpl_chinese_name'];?></label></td>
</tr>
<!-- 模板信息 -->

<!-- 人员信息 -->
<tr><td class="table_title" colspan="6">人员信息</td></tr>
<tr>
<td>派发人员</td>
<td><label><?php echo $users[$templates['tpl_master_id']];?></label></td>
<td>设计人员</td>
<td><label><?php echo $users[$templates['tpl_designer_id']];?></label></td>
<td>测试人员</td>
<td>
<label><?php echo $users[$templates['tpl_tester_id']];?></label>
</td>
</tr>
<tr>
<td>测试组长</td>
<td><label><?php echo $users[$templates['tpl_tester_leader_id']];?></label></td>
<td>发布人员</td>
<td colspan="3"><label><?php echo $users[$templates['tpl_publisher_id']];?></label></td>
</tr>
<!-- 人员信息 -->

<!-- 时间信息 -->
<tr><td class="table_title" colspan="6">时间信息</td></tr>
<tr>
<td>派发时间</td>
<?php 
if(!empty($templates['tpl_assign_time'])) 
{
	$assign_time = date('Y-m-d H:i:s',$templates['tpl_assign_time']); 
}
else
{
	$assign_time = '-';
}

if(!empty($templates['tpl_master_allow_time']))
{
	$tpl_master_allow_time = date('Y-m-d H:i:s',$templates['tpl_master_allow_time']); 
}
else
{
	$tpl_master_allow_time = '-';
}
?>
<td><label><?php echo $assign_time;?></label></td>
<td>总监审核通过时间</td>
<td><label><?php echo $tpl_master_allow_time;?></label></td>
<td>测试人员测试通过时间</td>
<?php 
if(!empty($templates['tpl_allow_time']))
{
	$tpl_allow_time = date('Y-m-d H:i:s',$templates['tpl_allow_time']);
} 
else
{
	$tpl_allow_time = '-';
}
?>
<td><label><?php echo $tpl_allow_time;?></label></td>
</tr>
<tr>
<td>发布时间</td>
<?php 
if(!empty($templates['tpl_finish_time']))
{
	$tpl_finish_time = date('Y-m-d H:i:s',$templates['tpl_finish_time']); 
}
else 
{
	$tpl_finish_time = '-';
}
?>
<td colspan="5"><label><?php echo $tpl_finish_time;?></label></td>
</tr>
<!-- 时间信息 -->

<!-- 备注信息 -->
<tr><td class="table_title" colspan="6">备注信息</td></tr>
<tr>
<td>总监设计要求</td>
<td colspan="5"><textarea cols="45" rows="10" readonly="readonly" name="tpl_master_assign_comment"><?php echo $templates['tpl_master_assign_comment'];?></textarea></td>
</tr>
<tr>
<td>设计人员意见</td>
<?php 
if(!($templates['tpl_status'] == 1 || $templates['tpl_status'] == 4 || $templates['tpl_status'] == 7))
{
	$readonly1 = "readonly='readonly'";
}
?>
<td colspan="5"><textarea cols="45" rows="10" <?php echo $readonly1;?> name="tpl_designer_comment"><?php echo $templates['tpl_designer_comment'];?></textarea></td>
</tr>
<tr>
<td>总监审核意见</td>
<?php 
if($templates['tpl_status'] != 2) $readonly2 = "readonly='readonly'";
?>
<td colspan="5"><textarea cols="45" rows="10" <?php echo $readonly2;?> name="tpl_master_comment"><?php echo $templates['tpl_master_comment'];?></textarea></td>
</tr>
<tr>
<td>测试人员意见</td>
<?php if($templates['tpl_status'] != 5) $readonly3 = "readonly='readonly'";?>
<td colspan="5"><textarea cols="45" rows="10" <?php echo $readonly3;?> name="tpl_tester_comment"><?php echo $templates['tpl_tester_comment'];?></textarea></td>
</tr>
<tr>
<td>发布人员意见</td>
<?php if($templates['tpl_status'] != 6) $readonly4 = "readonly='readonly'";?>
<td colspan="5"><textarea cols="45" rows="10" <?php echo $readonly4;?> name="tpl_publisher_comment"><?php echo $templates['tpl_publisher_comment'];?></textarea></td>
</tr>
<!-- 备注信息 -->
</table>